package com.jastar.android.game.richman.logic.card;

import com.jastar.android.game.richman.GameActivity;
import com.jastar.android.game.richman.logic.bean.Cell;
import com.jastar.android.game.richman.logic.bean.Player;
import com.jastar.android.game.richman.logic.handler.BaseCallback;
import com.jastar.android.game.richman.logic.weight.WeightAble;

import java.text.MessageFormat;

public abstract class Card extends WeightAble {

    private final String message;
    private final int price;

    public Card(String message, int weight, int price) {
        super(weight);
        this.message = message;
        this.price = price;
    }

    public String getMessage() {
        return message;
    }

    public String getMessageWithPrice() {
        return MessageFormat.format("{0}，价格{1}", message, price);
    }

    public int getPrice() {
        return price;
    }

    public abstract void use(GameActivity activity, Cell cell, Player player, BaseCallback callback);

}
